package com.example.chirdrenserver.Pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import org.springframework.beans.factory.annotation.Value;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class User implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "user_id", type = IdType.AUTO)
    private Long id;

    private String email;

    @Value("user")
    private String nickname;

    @JsonIgnore
    private String password;

    @TableField("avatar_file_key")
    private String avatarFileKey;

    @Value("没有描述")
    private String description;

    // true为男 false为女
    private Boolean sex;

    private LocalDateTime createTime;

}